﻿CREATE TABLE [Common].[Media]
(
	[MediaID] BIGINT IDENTITY(1,1) NOT NULL CONSTRAINT [COMMON_Media_MediaID] PRIMARY KEY,
	[ProviderURL] NVARCHAR(500) NOT NULL CONSTRAINT [COMMON_Media_ProviderURL] DEFAULT ('NONE'), 
	[MediaDesc] NVARCHAR(1000) NOT NULL CONSTRAINT [COMMON_Media_Description] DEFAULT ('NONE'), 
	[Title] NVARCHAR(1000) NOT NULL CONSTRAINT [COMMON_Media_Title] DEFAULT ('NONE'), 
	[ThumbnailHeight] INT NOT NULL CONSTRAINT [COMMON_Media_ThumbnailHeight] DEFAULT (0), 
	[ThumbnailWidth] INT NOT NULL CONSTRAINT [COMMON_Media_ThumbnailWidth] DEFAULT (0), 
	[HTML] NVARCHAR(500) NOT NULL CONSTRAINT [COMMON_Media_HTML] DEFAULT ('NONE'), 
	[AuthorName] NVARCHAR(255) NOT NULL CONSTRAINT [COMMON_Media_AuthorName] DEFAULT ('NONE'), 
	[MediaVersion] NVARCHAR(255) NOT NULL CONSTRAINT [COMMON_Media_Version] DEFAULT ('NONE'), 
	[ProviderName] NVARCHAR(255) NOT NULL CONSTRAINT [COMMON_Media_ProviderName] DEFAULT ('NONE'), 
	[ThumbnailURL] NVARCHAR(1500) NOT NULL CONSTRAINT [COMMON_Media_ThumbnailURL] UNIQUE DEFAULT ('NONE'), 
	[MediaType] NVARCHAR(255) NOT NULL CONSTRAINT [COMMON_Media_Type] DEFAULT ('NONE'),     
	[AuthorURL] NVARCHAR(500) NOT NULL CONSTRAINT [COMMON_Media_AuthorURL] UNIQUE DEFAULT ('NONE'), 
	[CreatedBy] NVARCHAR(250) NOT NULL CONSTRAINT [COMMON_Media_CreatedBy] DEFAULT SYSTEM_USER,	
	[DateCreated] DATETIME NOT NULL CONSTRAINT [COMMON_Media_DateCreated] DEFAULT GETDATE(), 
	[DateDeleted] DATETIME NULL,
	[VersionUser] NVARCHAR(250) NOT NULL CONSTRAINT [COMMON_Media_VersionUser] DEFAULT SYSTEM_USER,
	[VersionDate] DATETIME NOT NULL CONSTRAINT [COMMON_Media_VersionDate] DEFAULT GETDATE()
)